<template>
  <div>
    <el-row>
     <el-col :span="2">试卷名称:</el-col>
     <el-col :span="6"><b>{{ paperData.examinationPaperResponse.examinationPaperName }}</b></el-col>
    </el-row>
    <el-row style="margin-top: 10px">
     <el-col :span="2" >试卷总分:</el-col>
     <el-col :span="6"><b>{{ paperData.examinationPaperResponse.totalScore }}</b></el-col>
     <el-col :span="2" >考试时长:</el-col>
     <el-col :span="6"><b>{{ paperData.examinationPaperResponse.duration }}</b></el-col>
     <el-col :span="2" >通过分数:</el-col>
     <el-col :span="6"><b>{{ paperData.examinationPaperResponse.passScore }}</b></el-col>
    </el-row>

    <p v-show="!paperData.examinationPaperQuestionList" style="text-align: center">未添加试题</p>
    <el-card v-for="(examinationPaperQuestion,index) in paperData.examinationPaperQuestionList" :key="index" class="box-card" style="margin-top: 15px">
      <div slot="header" class="clearfix">
        <span>{{ indexs[index] + type[examinationPaperQuestion.type] }}</span>
      </div>
      <el-row v-for="(question,questionIndex) in examinationPaperQuestion.questionList" :key="questionIndex" style="margin-top: 15px">
       <el-col :span="24" style="margin-bottom: 10px; font-size: 16px">{{ parseInt(questionIndex) + 1 }}、{{ question.content }}(题分：<span style="color: red">{{question.score}}</span>分)</el-col>
       <el-col v-for="(option,optionIndex) in question.options" :key="optionIndex" style="padding: 5px 0px 5px 25px">{{ option.opt }}.{{ option.content }}</el-col>
      </el-row>
    </el-card>
  </div>
</template>

<script>
export default {
  name: "viewFixedPaper",
  props:{
    paperData: {
      required: true
    }
  },
  data(){
    return{
      type: [
        "未定义",
        "单选题",
        "多选题",
        "判断题",
        "填空题",
        "简答题"
      ],
      indexs: [
        "一、",
        "二、",
        "三、",
        "四、",
        "五、",
        "六、"
      ]
    }
  }
}
</script>

<style scoped>

</style>
